package ysc.cqnu.operdb.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysc.cqnu.operdb.entity.Assemble;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.mapper.ZhuangpeiMapper;
import ysc.cqnu.operdb.service.EnterZhuangPeiInfoViewDetailsService;

@Service
public class EnterZhuangPeiInfoViewDetailsServiceImpl implements EnterZhuangPeiInfoViewDetailsService {
    @Autowired
    private ResultData resultData;
    @Autowired
    private Assemble assemble;
    @Autowired
    private ZhuangpeiMapper zhuangpeiMapper;
    @Override
    public ResultData enterZhuangPeiInfoViewDetailsService(String id) {
        try {
            assemble = zhuangpeiMapper.zhuangpeidetails(id);
            resultData.flag="enterZhuangpeiInfoViewDetailsSuccess";
            resultData.data=assemble;
            return resultData;
        }
        catch (Exception e){
            resultData.flag="enterZhuangpeiInfoViewDetailsFail";
            resultData.data=null;
            return resultData;
        }
    }
}
